<?php
/*
|--------------------------------------------------------------------------
| Common function method
|--------------------------------------------------------------------------
*/

use Hyperf\Utils\ApplicationContext;
use Hyperf\Redis\Redis;

/**
 * 容器实例
 * @return \Psr\Container\ContainerInterface
 */
function container()
{
    return ApplicationContext::getContainer();
}

/**
 * Redis 客户端实例
 * @return Redis|mixed
 */
function redis()
{
    return container()->get(Redis::class);
}
